import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SSpecialPanicBuyItem } from "./SSpecialPanicBuyItem";
//class SeqSpecialPanicBuyItemHelper
    
    export  class SeqSpecialPanicBuyItemHelper
    {
       

        public static write(arg1: SerializeStream, arg2: Array<any>): void
        {
            var loc1=0;
            var loc2=null;
            if (arg2 != null) 
            {
                arg1.writeSize(arg2.length);
                loc1 = 0;
                while (loc1 < arg2.length) 
                {
                    (loc2 = arg2[loc1] as SSpecialPanicBuyItem).__write(arg1);
                    ++loc1;
                }
            }
            else 
            {
                arg1.writeSize(0);
            }
            return;
        }

        public static read(arg1: SerializeStream): Array<any>
        {
            var loc1=null;
            var loc4=null;
            var loc2=arg1.readSize();
            arg1.checkFixedSeq(loc2, 32);
            loc1 = new Array<any>();
            var loc3=0;
            while (loc3 < loc2) 
            {
                (loc4 = new SSpecialPanicBuyItem()).__read(arg1);
                loc1[loc3] = loc4;
                ++loc3;
            }
            return loc1;
        }
    }
